<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<title>修改代码</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">

<link href="${ctx }/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
<link href="${ctx }/css/font-awesome.css?v=4.4.0" rel="stylesheet">

<!-- jqgrid-->
<link href="${ctx }/css/plugins/jqgrid/ui.jqgrid.css?0820"
	rel="stylesheet">

<link href="${ctx }/css/animate.css" rel="stylesheet">
<link href="${ctx }/css/style.css?v=4.1.0" rel="stylesheet">
<style>
body {
	background: none;
}   
</style>
</head>

<div class="inmodal" role="dialog" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content animated bounceInRight">
			<div class="modal-header">
				<button type="button" class="close closeWin" data-dismiss="modal">
					<span aria-hidden="true">&times;</span><span class="sr-only">关闭</span>
				</button>
				<h4 class="modal-title">修改代码类型</h4>
			</div>
			<div class="ibox-content">
				<form class="form-horizontal m-t" id="editSysCodeTypeForm">
					<div class="form-group">
						<label class="col-sm-3 control-label">类型名称：</label>
						<div class="col-sm-8">
							<input id="typeName" name="typeName" class="form-control"
								required="" aria-required="true" type="text" readonly="readonly"
								value="${sysCodeType.typeName }">
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">类型描述：</label>
						<div class="col-sm-8">
							<input id="typeDesc" name="typeDesc" class="form-control"
								type="text" required="" aria-required="true"
								value="${sysCodeType.typeDesc }">
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label" for="readOnly">只读：</label>
						<div class="col-sm-8">
							<input type="radio"
								<c:if test="${sysCodeType.readOnly == true }">
                            		checked="checked"</c:if>
								name="readOnly" value="true">是 <input type="radio"
								<c:if test="${sysCodeType.readOnly == false }">
                            		checked="checked"</c:if>
								name="readOnly" value="false">否
						</div>
					</div>
					<div class="form-group">
						<div class="col-sm-8 col-sm-offset-3">
							<button type="button" class="btn btn-white closeWin"
								data-dismiss="modal" id="closeWin">关闭</button>
							<button type="submit" class="btn btn-primary"
								id="update_SysCodeType_submit">保存</button>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>

<!-- 全局js -->
<script src="${ctx }/js/jquery.min.js?v=2.1.4"></script>
<script src="${ctx }/js/bootstrap.min.js?v=3.3.6"></script>

<!-- Peity -->
<script src="${ctx }/js/plugins/peity/jquery.peity.min.js"></script>

<!-- jqGrid -->
<script src="${ctx }/js/plugins/jqgrid/i18n/grid.locale-cn.js?0820"></script>
<script src="${ctx }/js/plugins/jqgrid/jquery.jqGrid.min.js?0820"></script>

<!-- jQuery Validation plugin javascript-->
<script src="${ctx }/js/plugins/validate/jquery.validate.min.js"></script>
<script src="${ctx }/js/plugins/validate/messages_zh.min.js"></script>

<!-- layer javascript -->
<script src="${ctx }/js/plugins/layer/layer.min.js"></script>

<!-- jQuery form-->
<script src="${ctx }/js/jquery.form.js"></script>


<!-- 自定义js -->
<script src="${ctx }/js/content.js?v=1.0.0"></script>

<script type="text/javascript">
	$(document).ready(function() {
		$.jgrid.defaults.styleUI = 'Bootstrap';
		//绑定add表单提交事件,异步提交表单
		$('#editSysCodeTypeForm').submit(function() {
			$.ajax({
				type : "post",
				url : "${ctx }/codeType/doEditCodeType",
				data : $('#editSysCodeTypeForm').serialize(),
				success : function(data) {
					if (data.errcode == "0") {
						layer.alert(data.errmsg, {
							icon : 1
						}, function(index) {
							//刷新表格数据
							window.parent.editWinClose('0');
							//关闭提示框
							layer.close(index);
						});
					} else {
						layer.alert(errmsg, {
							icon : 2
						});
					}
				},
				error : function() {
					layer.alert('添加菜单失败！', {
						icon : 2
					});
				}
			});
			return false;
		});

		$('.closeWin').click(function() {
			window.parent.editWinClose('1');
		});

	});
</script>



</html>
